<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>5分钟用Arthas定位Java线上故障</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
        }
        
        .hero-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        
        .content-card {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease;
        }
        
        .content-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
        }
        
        .section-title {
            position: relative;
            padding-left: 20px;
        }
        
        .section-title::before {
            content: '';
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 4px;
            height: 24px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 2px;
        }
        
        .code-block {
            background: #1e1e1e;
            color: #d4d4d4;
            border-radius: 8px;
            padding: 20px;
            overflow-x: auto;
            position: relative;
            margin: 20px 0;
        }
        
        .code-block::before {
            content: 'SHELL';
            position: absolute;
            top: 10px;
            right: 10px;
            font-size: 12px;
            color: #666;
            font-weight: 500;
        }
        
        .feature-card {
            background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
            border-radius: 12px;
            padding: 24px;
            transition: all 0.3s ease;
            border: 1px solid rgba(0, 0, 0, 0.05);
        }
        
        .feature-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        }
        
        .timeline-item {
            position: relative;
            padding-left: 40px;
            margin-bottom: 30px;
        }
        
        .timeline-item::before {
            content: '';
            position: absolute;
            left: 10px;
            top: 8px;
            width: 12px;
            height: 12px;
            background: #667eea;
            border-radius: 50%;
            box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
        }
        
        .timeline-item::after {
            content: '';
            position: absolute;
            left: 15px;
            top: 20px;
            width: 2px;
            height: calc(100% + 10px);
            background: #e0e0e0;
        }
        
        .timeline-item:last-child::after {
            display: none;
        }
        
        .highlight-text {
            background: linear-gradient(120deg, #ffd700 0%, #ffed4e 100%);
            padding: 2px 6px;
            border-radius: 4px;
            font-weight: 500;
        }
        
        .mermaid {
            display: flex;
            justify-content: center;
            margin: 40px 0;
        }
        
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .animate-fadeInUp {
            animation: fadeInUp 0.8s ease-out;
        }
    </style>
</head>
<body>
    <!-- Hero Section -->
    <div class="hero-gradient text-white py-20 px-6">
        <div class="max-w-6xl mx-auto">
            <div class="animate-fadeInUp">
                <h1 class="text-5xl md:text-6xl font-bold mb-6 leading-tight">
                    5分钟用Arthas定位<br>Java线上故障
                </h1>
                <p class="text-xl md:text-2xl mb-8 opacity-90 max-w-3xl">
                    凌晨三点的告警，系统响应缓慢，用户投诉不断。传统方式束手无策？
                    让阿里巴巴开源的Arthas成为你的线上诊断利器。
                </p>
                <div class="flex items-center space-x-6">
                    <div class="flex items-center">
                        <i class="fas fa-clock text-3xl mr-3"></i>
                        <div>
                            <div class="text-3xl font-bold">5分钟</div>
                            <div class="text-sm opacity-80">快速定位</div>
                        </div>
                    </div>
                    <div class="flex items-center">
                        <i class="fas fa-server text-3xl mr-3"></i>
                        <div>
                            <div class="text-3xl font-bold">0重启</div>
                            <div class="text-sm opacity-80">无需中断服务</div>
                        </div>
                    </div>
                    <div class="flex items-center">
                        <i class="fas fa-code text-3xl mr-3"></i>
                        <div>
                            <div class="text-3xl font-bold">0侵入</div>
                            <div class="text-sm opacity-80">不修改代码</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- Main Content -->
    <div class="max-w-6xl mx-auto px-6 py-12">
        <!-- Introduction Card -->
        <div class="content-card rounded-2xl p-8 mb-12 animate-fadeInUp">
            <div class="flex items-start">
                <div class="mr-6">
                    <i class="fas fa-lightbulb text-5xl text-yellow-500"></i>
                </div>
                <div class="flex-1">
                    <h2 class="text-2xl font-bold mb-4">为什么选择Arthas？</h2>
                    <p class="text-gray-700 leading-relaxed text-lg">
                        作为一名经历过无数次线上故障的Java工程师，我深知传统调试方式的痛点。
                        Arthas让我能够在不重启应用、不修改代码的情况下，迅速定位线上问题。
                        它支持JVM多版本，能够实时分析和诊断Java应用的各种疑难杂症。
                    </p>
                </div>
            </div>
        </div>

        <!-- Arthas Architecture Diagram -->
        <div class="content-card rounded-2xl p-8 mb-12">
            <h2 class="text-3xl font-bold mb-6 section-title">Arthas核心功能架构</h2>
            <div class="mermaid">
                graph TB
                    A[Arthas诊断工具] --> B[CPU诊断]
                    A --> C[内存诊断]
                    A --> D[性能分析]
                    A --> E[类加载诊断]
                    
                    B --> B1[dashboard<br/>系统监控]
                    B --> B2[thread<br/>线程分析]
                    B --> B3[jstack<br/>堆栈追踪]
                    
                    C --> C1[heapdump<br/>堆转储]
                    C --> C2[memory<br/>内存分析]
                    C --> C3[MAT集成<br/>深度分析]
                    
                    D --> D1[trace<br/>方法追踪]
                    D --> D2[monitor<br/>方法监控]
                    D --> D3[profiler<br/>火焰图]
                    
                    E --> E1[classloader<br/>类加载器]
                    E --> E2[jad<br/>反编译]
                    E --> E3[redefine<br/>热修复]
                    
                    style A fill:#667eea,stroke:#fff,stroke-width:3px,color:#fff
                    style B fill:#ffd700,stroke:#333,stroke-width:2px
                    style C fill:#ff6b6b,stroke:#333,stroke-width:2px
                    style D fill:#4ecdc4,stroke:#333,stroke-width:2px
                    style E fill:#95e1d3,stroke:#333,stroke-width:2px
            </div>
        </div>

        <!-- Quick Start Section -->
        <div class="grid grid-cols-1 md:grid-cols-2 gap-8 mb-12">
            <div class="content-card rounded-2xl p-8">
                <h3 class="text-2xl font-bold mb-6 section-title">
                    <i class="fas fa-rocket text-purple-600 mr-3"></i>快速开始
                </h3>
                <div class="timeline-item">
                    <h4 class="font-bold text-lg mb-2">1. 下载安装</h4>
                    <p class="text-gray-700 mb-3">下载arthas-boot.jar，一个文件搞定所有</p>
                    <div class="code-block">
                        <code>java -jar arthas-boot.jar</code>
                    </div>
                </div>
                <div class="timeline-item">
                    <h4 class="font-bold text-lg mb-2">2. 选择进程</h4>
                    <p class="text-gray-700 mb-3">Arthas会自动扫描Java进程</p>
                    <div class="code-block">
                        <code>* [1]:12345  com.ts.demo.Application</code>
                    </div>
                </div>
                <div class="timeline-item">
                    <h4 class="font-bold text-lg mb-2">3. 开始诊断</h4>
                    <p class="text-gray-700">输入命令，实时分析问题</p>
                </div>
            </div>
            
            <div class="content-card rounded-2xl p-8">
                <h3 class="text-2xl font-bold mb-6 section-title">
                    <i class="fas fa-shield-alt text-green-600 mr-3"></i>生产环境最佳实践
                </h3>
                <div class="space-y-4">
                    <div class="feature-card">
                        <h4 class="font-bold mb-2 flex items-center">
                            <i class="fas fa-lock text-purple-600 mr-2"></i>
                            安全措施
                        </h4>
                        <p class="text-gray-700">仅在内网使用，设置白名单，及时断开连接</p>
                    </div>
                    <div class="feature-card">
                        <h4 class="font-bold mb-2 flex items-center">
                            <i class="fas fa-chart-line text-blue-600 mr-2"></i>
                            协同策略
                        </h4>
                        <p class="text-gray-700">Arthas临时排查 + APM长期监控，双剑合璧</p>
                    </div>
                    <div class="feature-card">
                        <h4 class="font-bold mb-2 flex items-center">
                            <i class="fas fa-exclamation-triangle text-yellow-600 mr-2"></i>
                            避坑指南
                        </h4>
                        <p class="text-gray-700">避免高并发时执行重操作，及时清理临时文件</p>
                    </div>
                </div>
            </div>
        </div>

        <!-- Real Case Studies -->
        <div class="content-card rounded-2xl p-8 mb-12">
            <h2 class="text-3xl font-bold mb-8 section-title">实战案例解析</h2>
            
            <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
                <div class="bg-gradient-to-br from-red-50 to-red-100 rounded-xl p-6 border border-red-200">
                    <div class="flex items-center mb-4">
                        <i class="fas fa-fire text-red-500 text-3xl mr-3"></i>
                        <h3 class="text-xl font-bold">CPU飙升100%</h3>
                    </div>
                    <p class="text-gray-700 mb-4">缓存失效导致死循环，系统响应缓慢</p>
                    <div class="bg-white rounded-lg p-4 text-sm">
                        <p class="font-mono text-gray-800">
                            ts> thread -n 5<br>
                            ts> thread 123<br>
                            → 定位到CacheService.get死循环
                        </p>
                    </div>
                    <p class="text-green-600 font-bold mt-4">
                        <i class="fas fa-check-circle mr-1"></i>5分钟定位问题
                    </p>
                </div>
                
                <div class="bg-gradient-to-br from-blue-50 to-blue-100 rounded-xl p-6 border border-blue-200">
                    <div class="flex items-center mb-4">
                        <i class="fas fa-memory text-blue-500 text-